<template>
  <div class="sonb">
    <h3>{{ xxx }}</h3>
  </div>
</template>
<script>
import bus from '@/utils/bus'
export default {
  data() {
    return {
      xxx: ''
    }
  },
  mounted() {
    // this.$bus.$on('atob', (num) => {
    //   this.xxx = num
    //   console.log(num)
    // })
    bus.$on('atob', (num) => {
      this.xxx = num
      console.log(num)
    })
  },
  beforeDestroy() {
    // this.$bus.$off('atob')
    bus.$off('atob')
  }
}
</script>
<style lang="scss" scoped>
.sonb {
  width: 200px;
  height: 100px;
  background-color: #0f0;
}
</style>
